# coding=utf-8
import os
from abc import ABC

from apps.base_handler import base_handler

OBJECT_PATH = os.path.split(os.path.realpath(__file__))[0]


# 简单的模仿flask做一个路由装饰器
class handlers(object):
    urls = []

    @classmethod
    def route(cls, rule):
        def decorator(f):
            cls.urls.append(("/graph/api" + rule, f))
            return f

        return decorator


# 导入需要的api
from apps.apis import web


class MainHandler(base_handler, ABC):
    def get(self):
        self.finish("hello word")


handlers.urls.append((r"/", MainHandler))
handlers.urls.append((r"/index.html", MainHandler))
handlers.urls.append((r"/index", MainHandler))
